package cn.com.surker.material.entity;

import cn.com.surker.base.BaseEntity;
import cn.com.surker.util.StringUtils;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.IOException;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.*;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 主材材料结算信息表
 * </p>
 *
 * @author admin
 * @since 2024-12-03
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class MainMaterialBill extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 公司ID
     */
    private Long orgId;

    /**
     * 公司
     */
    private String orgName;

    /**
     * 供应商ID
     */
    private Long supplierId;

    /**
     * 供应商
     */
    private String supplier;

    /**
     * 运输供应商ID
     */
    private Long transportId;

    /**
     * 运输供应商
     */
    private String transport;

    /**
     * 结算时间
     */
    private String today;

    /**
     * 报表开始时间
     */
    private String startTime;

    /**
     * 报表结束时间
     */
    private String endTime;

    /**
     * 材料ID
     */
    private Long materialId;

    /**
     * 材料名称
     */
    private String material;

    /**
     * 供方净重
     */
    private Double supplierWeight;

    /**
     * 过磅净重
     */
    private Double weight;

    /**
     * 价格生效时间
     */
    private String takeTime;

    /**
     * 单价
     */
    private Double price;

    /**
     * 类型(0：主材，1：运输)
     */
    private Integer type;

    /**
     * 费用类型(0:结算1:补贴)
     */
    private Integer priceType;

    /**
     * 是否结算(0:结算，1:不结算)
     */
    private Integer isBill;

    /**
     * 是否审核(0:未审核1:已审核)
     */
    private Integer isCheck;
    /**
     * 计入方式(0:自动1:手动)
     */
    private Integer isAuto;

    /**
     * 审核人
     */
    private String checker;

    /**
     * 审核时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date checkTime;

    /**
     * 是否审核(0:未审核1:已审核)
     */
    private Integer isFinance;

    /**
     * 调价备注
     */
    private String priceRemark;
    /**
     * 财务审核人
     */
    private String finance;
    /**查询条件**/
    @TableField(exist = false)
    private String searchVal;
    /**结算吨位类型 0按过磅吨位结算 1按供方吨位结算**/
    private Integer billWeightType;

    /**
     * 财务审核时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date financeTime;

    public MainMaterialBill(){}
    public MainMaterialBill(Long orgId, String orgName, Long supplierId, String supplier, Long transportId, String transport, String today, String startTime, String endTime, Long materialId, String material, Double supplierWeight, Double weight, String takeTime, Double price, Integer type, Integer priceType, Integer isBill, Integer isCheck, String checker, Date checkTime, Integer isFinance, String finance, Date financeTime) {
        this.orgId = orgId;
        this.orgName = orgName;
        this.supplierId = supplierId;
        this.supplier = supplier;
        this.transportId = transportId;
        this.transport = transport;
        this.today = today;
        this.startTime = startTime;
        this.endTime = endTime;
        this.materialId = materialId;
        this.material = material;
        this.supplierWeight = supplierWeight;
        this.weight = weight;
        this.takeTime = takeTime;
        this.price = price;
        this.type = type;
        this.priceType = priceType;
        this.isBill = isBill;
        this.isCheck = isCheck;
        this.checker = checker;
        this.checkTime = checkTime;
        this.isFinance = isFinance;
        this.finance = finance;
        this.financeTime = financeTime;
    }
}
